/*一次性给服务器发送多条数据，然后查看服务器的处理结果*/
/*每一条请求都应该得到正常处理*/

#include <iostream>

#include "../source/Server.hpp"

int main()
{
    TcpSocket client;
    client.BulidClientSocket("127.0.0.1", 8888);
    std::string req = "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    req += "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    req += "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    while (true)
    {
        assert(client.Send(req) != -1);
        std::string out;
        assert(client.Recv(&out));
        DEBUG_LOG("[%s]", out.c_str());
        sleep(15);
    }
    return 0;
}